3.1.79 \(\int x^{1+m} \sin (a+b x) \, dx\) [79]

Optimal. Leaf size=79 \[ -\frac {i e^{i a} x^m (-i b x)^{-m} \Gamma (2+m,-i b x)}{2 b^2}+\frac {i e^{-i a} x^m (i b x)^{-m} \Gamma (2+m,i b x)}{2 b^2} \]

[Out]

-1/2*I*exp(I*a)*x^m*GAMMA(2+m,-I*b*x)/b^2/((-I*b*x)^m)+1/2*I*x^m*GAMMA(2+m,I*b*x)/b^2/exp(I*a)/((I*b*x)^m)

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 79, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3389, 2212} \begin {gather*} \frac {i e^{-i a} x^m (i b x)^{-m} \text {Gamma}(m+2,i b x)}{2 b^2}-\frac {i e^{i a} x^m (-i b x)^{-m} \text {Gamma}(m+2,-i b x)}{2 b^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^(1 + m)*Sin[a + b*x],x]

[Out]

((-1/2*I)*E^(I*a)*x^m*Gamma[2 + m, (-I)*b*x])/(b^2*((-I)*b*x)^m) + ((I/2)*x^m*Gamma[2 + m, I*b*x])/(b^2*E^(I*a
)*(I*b*x)^m)

Rule 2212

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))*((c_.) + (d_.)*(x_))^(m_), x_Symbol] :> Simp[(-F^(g*(e - c*(f/d))))*((c
+ d*x)^FracPart[m]/(d*((-f)*g*(Log[F]/d))^(IntPart[m] + 1)*((-f)*g*Log[F]*((c + d*x)/d))^FracPart[m]))*Gamma[m
 + 1, ((-f)*g*(Log[F]/d))*(c + d*x)], x] /; FreeQ[{F, c, d, e, f, g, m}, x] &&  !IntegerQ[m]

Rule 3389

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Dist[I/2, Int[(c + d*x)^m/E^(I*(e + f*x))
, x], x] - Dist[I/2, Int[(c + d*x)^m*E^(I*(e + f*x)), x], x] /; FreeQ[{c, d, e, f, m}, x]

Rubi steps

\begin {align*} \int x^{1+m} \sin (a+b x) \, dx &=\frac {1}{2} i \int e^{-i (a+b x)} x^{1+m} \, dx-\frac {1}{2} i \int e^{i (a+b x)} x^{1+m} \, dx\\ &=-\frac {i e^{i a} x^m (-i b x)^{-m} \Gamma (2+m,-i b x)}{2 b^2}+\frac {i e^{-i a} x^m (i b x)^{-m} \Gamma (2+m,i b x)}{2 b^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 79, normalized size = 1.00 \begin {gather*} -\frac {i e^{i a} x^m (-i b x)^{-m} \Gamma (2+m,-i b x)}{2 b^2}+\frac {i e^{-i a} x^m (i b x)^{-m} \Gamma (2+m,i b x)}{2 b^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x^(1 + m)*Sin[a + b*x],x]

[Out]

((-1/2*I)*E^(I*a)*x^m*Gamma[2 + m, (-I)*b*x])/(b^2*((-I)*b*x)^m) + ((I/2)*x^m*Gamma[2 + m, I*b*x])/(b^2*E^(I*a
)*(I*b*x)^m)

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 0.04, size = 290, normalized size = 3.67

method result size
meijerg \(2^{1+m} b^{-2-m} \sqrt {\pi }\, \left (\frac {2^{-1-m} x^{2+m} b^{2+m} m \left (b x \right )^{-\frac {3}{2}-m} \LommelS 1 \left (m +\frac {1}{2}, \frac {3}{2}, b x \right ) \sin \left (b x \right )}{\sqrt {\pi }}-\frac {2^{-1-m} x^{2+m} b^{2+m} \left (b x \right )^{-\frac {5}{2}-m} \left (\cos \left (b x \right ) x b -\sin \left (b x \right )\right ) \LommelS 1 \left (m +\frac {3}{2}, \frac {1}{2}, b x \right )}{\sqrt {\pi }}\right ) \cos \left (a \right )+\frac {2^{1+m} \left (b^{2}\right )^{-\frac {m}{2}} \sqrt {\pi }\, \left (\frac {2^{-1-m} x^{1+m} b \left (b^{2}\right )^{\frac {m}{2}} \sin \left (b x \right )}{\sqrt {\pi }\, \left (2+m \right )}+\frac {3 \,2^{-2-m} x^{2+m} b^{2} \left (b^{2}\right )^{\frac {m}{2}} \left (\frac {2}{3}+\frac {2 m}{3}\right ) \left (b x \right )^{-\frac {3}{2}-m} \LommelS 1 \left (m +\frac {3}{2}, \frac {3}{2}, b x \right ) \sin \left (b x \right )}{\sqrt {\pi }\, \left (2+m \right )}+\frac {2^{-1-m} x^{2+m} b^{2} \left (b^{2}\right )^{\frac {m}{2}} \left (1+m \right ) \left (b x \right )^{-\frac {5}{2}-m} \left (\cos \left (b x \right ) x b -\sin \left (b x \right )\right ) \LommelS 1 \left (m +\frac {1}{2}, \frac {1}{2}, b x \right )}{\sqrt {\pi }}\right ) \sin \left (a \right )}{b^{2}}\) \(290\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^(1+m)*sin(b*x+a),x,method=_RETURNVERBOSE)

[Out]

2^(1+m)*b^(-2-m)*Pi^(1/2)*(2^(-1-m)/Pi^(1/2)*x^(2+m)*b^(2+m)*m*(b*x)^(-3/2-m)*LommelS1(m+1/2,3/2,b*x)*sin(b*x)
-2^(-1-m)/Pi^(1/2)*x^(2+m)*b^(2+m)*(b*x)^(-5/2-m)*(cos(b*x)*x*b-sin(b*x))*LommelS1(m+3/2,1/2,b*x))*cos(a)+2^(1
+m)/b^2*(b^2)^(-1/2*m)*Pi^(1/2)*(2^(-1-m)/Pi^(1/2)/(2+m)*x^(1+m)*b*(b^2)^(1/2*m)*sin(b*x)+3*2^(-2-m)/Pi^(1/2)/
(2+m)*x^(2+m)*b^2*(b^2)^(1/2*m)*(2/3+2/3*m)*(b*x)^(-3/2-m)*LommelS1(m+3/2,3/2,b*x)*sin(b*x)+2^(-1-m)/Pi^(1/2)*
x^(2+m)*b^2*(b^2)^(1/2*m)*(1+m)*(b*x)^(-5/2-m)*(cos(b*x)*x*b-sin(b*x))*LommelS1(m+1/2,1/2,b*x))*sin(a)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(1+m)*sin(b*x+a),x, algorithm="maxima")

[Out]

integrate(x^(m + 1)*sin(b*x + a), x)

________________________________________________________________________________________

Fricas [A]
time = 0.11, size = 52, normalized size = 0.66 \begin {gather*} -\frac {e^{\left (-{\left (m + 1\right )} \log \left (i \, b\right ) - i \, a\right )} \Gamma \left (m + 2, i \, b x\right ) + e^{\left (-{\left (m + 1\right )} \log \left (-i \, b\right ) + i \, a\right )} \Gamma \left (m + 2, -i \, b x\right )}{2 \, b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(1+m)*sin(b*x+a),x, algorithm="fricas")

[Out]

-1/2*(e^(-(m + 1)*log(I*b) - I*a)*gamma(m + 2, I*b*x) + e^(-(m + 1)*log(-I*b) + I*a)*gamma(m + 2, -I*b*x))/b

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int x^{m + 1} \sin {\left (a + b x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**(1+m)*sin(b*x+a),x)

[Out]

Integral(x**(m + 1)*sin(a + b*x), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(1+m)*sin(b*x+a),x, algorithm="giac")

[Out]

integrate(x^(m + 1)*sin(b*x + a), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int x^{m+1}\,\sin \left (a+b\,x\right ) \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^(m + 1)*sin(a + b*x),x)

[Out]

int(x^(m + 1)*sin(a + b*x), x)

________________________________________________________________________________________